package com.yuw.oop.overridedemo;

public class Person {
	// 属性

	private String perName = "小明";
	private String perSex;
	private int perAge;

	// 行为

	/**
	 * 饮食行为
	 */
	public void doEating() {
		System.out.println(this.perName + " is eating...");
	}

	/**
	 * 睡觉休息行为
	 */
	public void doSleeping() {
		System.out.println(this.perName + " is sleeping...");
	}

	////////////////////////////////////////////////////

	public Person(String perName, String perSex, int perAge) {
		super();
		this.perName = perName;
		this.perSex = perSex;
		this.perAge = perAge;
		System.out.println("执行了父类Person类的带三个参数的构造方法...");
	}

	public Person() {
		System.out.println("执行了父类Person类的默认的构造方法...");
	}

	public String getPerName() {
		return perName;
	}

	public void setPerName(String perName) {
		this.perName = perName;
	}

	public String getPerSex() {
		return perSex;
	}

	public void setPerSex(String perSex) {
		this.perSex = perSex;
	}

	public int getPerAge() {
		return perAge;
	}

	public void setPerAge(int perAge) {
		this.perAge = perAge;
	}

}
